<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:component="http://java.sun.com/jsf/composite/component">

    <ui:composition template="/resources/include/template.xhtml">

        <ui:define name="title">

            <h:outputText value="#{bundle.Bambole} - #{bundle.Product}"/>

        </ui:define>

        <ui:define name="body">

            <h:form>

                <ui:include src="/resources/include/menu.xhtml"/> 

                <p:panel header="#{productController.selected.enabled ? '' : ' ~ '}
                         #{bundle.Product} - #{bundle.View}
                         #{productController.selected.enabled ? '' : ' ~ '}">

                    <component:toolbar

                        refreshButtonDisabled="true"         
                        saveButtonDisabled="true"

                        previousButtonDisabled="#{!productController.hasPreviousRecord}"
                        nextButtonDisabled="#{!productController.hasNextRecord}"     

                        returnButtonAction="#{productController.prepareList}"
                        previousButtonAction="#{productController.previousItem}"
                        nextButtonAction="#{productController.nextItem}"            
                        createButtonAction="#{productController.prepareCreate}"
                        editButtonAction="#{productController.prepareEdit}"
                        searchButtonAction="#{productController.prepareSearch}"
                        deleteButtonAction="#{productController.destroy}"

                        additionalInfoButtonRendered="true"            

                        menuButtonRendered="true"

                        menuItem01Value="#{bundle.Image}"
                        menuItem01Action="#{productController.prepareImageList}"            

                        /> 

                    <component:product

                        enabledDisabled="true"
                        codeDisabled="true"
                        categoryDisabled="true"            
                        nameDisabled="true"
                        priceDisabled="true"
                        descriptionDisabled="true"
                        weightDisabled="true"
                        heightDisabled="true"
                        widthDisabled="true"
                        lengthDisabled="true"
                        tagsDisabled="true"
                        colorListDisabled="true"
                        imageUploadDisabled="true"
                        imageDeleteButtonDisabled="true"

                        priceRendered="true"
                        priceLastUpdatedRendered="true" 
                        weightRendered="true"
                        heightRendered="true"
                        widthRendered="true"
                        lengthRendered="true"
                        imageAndColorListRendered="true"          

                        />          

                </p:panel>

            </h:form>

        </ui:define>

    </ui:composition>

</html>
